package com.swdegao.iot.netty.utils;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

public class ExceptionUitls {
    /**
     * 抛出具体报错的代码位置
     * @param e
     * @return
     */
    public static String getExceptionInfo(Exception e) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        e.printStackTrace(new PrintStream(baos));
        return baos.toString();
    }
}
